/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-08-15
 * Time: 9:08
 */
public class JiecCheng {
    public static void main(String[] args) {
        int n = 1;
        int sum = 0;
        while (n <= 5) {
            int i = 1;
            int a = 1;
            while (i <= n) {
                a = a * i;
                i++;
            }
            sum += a;
            n++;
        }
        System.out.println(sum);
    }
}
